// main-app/vite.config.js
import { defineConfig } from 'vite'
import vue from '@vitejs/plugin-vue'
import federation from '@originjs/vite-plugin-federation'
import path from 'path'
export default defineConfig({
  server: {
    port: 3000
  },
  plugins: [
    vue(),
    federation({
      name: 'main-app',
      remotes: {
       packages_center: 'http://localhost:3001/dist/assets/remoteEntry.js'
      },
       shared: ['vue', 'vue-router'], 
    })
  ],
  resolve: {
      alias: {
        '@': path.resolve(__dirname, 'src')
      },
      extensions: ['.js', '.json', '.vue', '.less', '.ts']
    },
})
